Export split partnership/S-corp income leaves in the US PUF build#22
Closed
MaxGhenis wants to merge 1 commit into
Closed
Export split partnership/S-corp income leaves in the US PUF build#22MaxGhenis wants to merge 1 commit into
MaxGhenis wants to merge 1 commit into
Conversation
Mirror policyengine-us#8614 (merged) and policyengine-us-data#1169: partnership_s_corp_income is now a formula-owned aggregate (adds = [partnership_income, s_corp_income]) in the model, so the build imputes the two leaves as inputs rather than the aggregate, and partnership_se_income is renamed to partnership_self_employment_net_earnings. - PUF_IMPUTE_VARS: partnership_s_corp_income -> partnership_income + s_corp_income - v3 QBI/partnership block + V1_ZERO_DEFAULTS: partnership_se_income -> partnership_self_employment_net_earnings - tail-support income proxy: use the two leaves (sum unchanged) Coupled to us-data #1169 (the --usdata-repo checkout must export the leaves). Not build-verified (restricted PUF); py_compile only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Propagate the partnership / S-corp income split into the US dataset build, mirroring the model change in PolicyEngine/policyengine-us#8614 (merged) and the usdata change in PolicyEngine/policyengine-us-data#1169.
In the model,
partnership_s_corp_incomeis now a formula-owned aggregate (adds = [partnership_income, s_corp_income]), andpartnership_se_incomewas renamed topartnership_self_employment_net_earnings. The build imputes model input variables from the PUF, so it must now produce the two leaves rather than the (now engine-computed) aggregate.Changes (
packages/populace-data/build/us/build_us_candidate.py)PUF_IMPUTE_VARS:partnership_s_corp_income→partnership_income+s_corp_incomeV1_ZERO_DEFAULTS:partnership_se_income→partnership_self_employment_net_earningsColumn names verified against #1169's exact PUF exports.
--usdata-repo, whosepuf.pymust export the leaf columns. The default worktrees are currently at a pre-#1169 commit, so this is draft until #1169 is available to the build.py_compile). Needs a build + parity / exported-nonzero gate run before merge.Mark ready once #1169 is in the build's usdata checkout and a build passes.